package com.project.dao;

import com.project.entity.User_RoleEntity;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

/**
 * @Author(王思翰)
 * @Description(类的描述)
 * @Date(创建时间) 2021/9/10 16:51
 */
public interface IUser_Role extends CrudRepository<User_RoleEntity,Long> {

    @Query("select new com.project.entity.User_RoleEntity(uru.name,ur.status) from User_RoleEntity ur left join" +
            " ur.userEntity uru left join ur.roleEntity urr")
    public List<User_RoleEntity> findAllBy();
}
